package server

const (
  MAX_CHAT_MSG_LENGTH = 70
)

func chatSayCommand(req *requestContext) error {
  // TODO
  return nil
}

func chatLoginCommand(req *requestContext) error {
  // TODO
  return nil
}

func chatCommand(c *requestContext) error {
  if len(c.args) != 4 {
    return ErrCmdParams
  }

  subcmd := string(c.args[0])

  switch subcmd {
  case "login":
    return chatLoginCommand(c)
  case "say":
    return chatSayCommand(c)
  }

  // TODO
  return nil
}

func init() {
  register("chat", chatCommand)
}
